import { ref } from 'vue';

import { PrimaryTableCol, TableRowData } from 'tdesign-vue-next';
import { CommonAnyData } from '@/api/model/common';

import ServerView from '../Server.vue';
import GA1400View from '../GA1400.vue'
import GB28181View from '../GB28181.vue'
import FtpView from '../FTP.vue'
import HttpView from '../HTTP.vue'

export const tabList = ref([
  { label: '服务器配置', value: 'server' },
  { label: 'GA1400配置', value: 'GA1400' },
  { label: 'GB28181配置', value: 'GB28181' },
  { label: 'FTP配置', value: 'FTP' },
  { label: 'HTTP配置', value: 'HTTP' },
]);

export const componentsMap: CommonAnyData = {
  server: ServerView,
  GA1400: GA1400View,
  GB28181: GB28181View,
  FTP: FtpView,
  HTTP: HttpView,
};

export const INIT_DATA = ref([
  { label: 'DHCP', value: false, key: 'SwitchView' },
]);

export const columns: PrimaryTableCol<TableRowData>[] = [
  { colKey: 'sn', title: '设备序列号', align: 'center' },
  { colKey: 'dev_name', title: '设备名称', align: 'center' },
  { colKey: 'opt', title: '操作', fixed: 'right', align: 'center', width: 360 },
];
